//
//  ZSQHttpmanager.h
//  2-QiuBai
//
//  Created by qianfeng on 16/5/6.
//  Copyright © 2016年 xuzhixiang1. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFNetworking.h"
/*********/
//成功的回调
typedef void(^SuccessBlock)(AFHTTPRequestOperation *operation,id responseObject);
//失败的回调
typedef void(^Failure)(AFHTTPRequestOperation *operation,NSError *error);
//成功的回调
typedef void(^SuccessBlockSession)(NSURLSessionDataTask *task,id responseObject);
//失败的回调
typedef void(^FailureSession)(NSURLSessionDataTask *task,NSError *error);
@interface ZSQHttpmanager : NSObject

+ (instancetype)sharedManager;
//
- (void)GET:(NSString *)url param:(NSDictionary *)params success:(SuccessBlock)success failure:(Failure)failure;
- (void)POST:(NSString *)url param:(NSDictionary *)params success:(SuccessBlock)success failure:(Failure)failure;

- (void)GET:(NSString *)url parameters:(NSDictionary *)params success:(SuccessBlockSession)success failure:(FailureSession)failure;
- (void)POST:(NSString *)url parameters:(NSDictionary *)params success:(SuccessBlockSession)success failure:(FailureSession)failure;






- (void)GETXML:(NSString *)url param:(NSDictionary *)params success:(SuccessBlock)success failure:(Failure)failure;
- (void)POSTXML:(NSString *)url param:(NSDictionary *)params success:(SuccessBlock)success failure:(Failure)failure ;
- (void)GETXML:(NSString *)url parameters:(NSDictionary *)params success:(SuccessBlockSession)success failure:(FailureSession)failure;
- (void)POSTXML:(NSString *)url parameters:(NSDictionary *)params success:(SuccessBlockSession)success failure:(FailureSession)failure;

@end
